package com.pactera.bledemo.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.DraggableModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.pactera.bledemo.R
import com.pactera.bledemo.bean.BleBean

/**
 * @author ypk
 * 创建日期：2021/9/10  8:56
 * 描述：
 */
class BleAdapter : BaseQuickAdapter<BleBean, BaseViewHolder>(R.layout.item_ble_view),
    DraggableModule {
    override fun convert(holder: BaseViewHolder, item: BleBean) {
        holder.setText(R.id.name, "名称：" + item.name)
        holder.setText(R.id.address, "mac地址:" + item.address)
        /*
           if (item.type == 1) {
               holder.setVisible(R.id.imgDelete, false)
               holder.setVisible(R.id.tvTip, true)
               holder.setText(R.id.tvTip, "起点")
           } else if (item.type == 2) {
               holder.setVisible(R.id.imgDelete, false)
               holder.setVisible(R.id.tvTip, true)
               holder.setText(R.id.tvTip, "终点")
           } else {
               holder.setVisible(R.id.imgDelete, true)
               holder.setVisible(R.id.tvTip, false)
           }*/


    }

}